package com.team.employment.common.exception;

import com.team.employment.common.result.ResultCodeEnum;
import lombok.Data;

@Data
public class CustomException extends RuntimeException{
    private Integer code;
    public CustomException(Integer code,String message){
        super(message);
        this.code = code;
    }
    public CustomException(ResultCodeEnum resultCodeEnum){
        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
    }
}
